#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef short int bool;
#define true    1
#define false   0

#define N 200
#define M 100

int queue[N] = {0};
int queue_len = 0;
int cur = 0;

int bednum = 0;
char arrivestr[N];
int record[N];

enum status
{
    initial = 0,
    order   = 1,
    checkin = 2,
    checkout= 4,
    cancel  = 8
};

void init()
{
    int i = 0;
    queue_len = 0;
    cur       = 0;

    for(i = 0; i < N; i++)
    {
        record[i] = initial;
    }
}

void pushqueue(char ch)
{
    queue[queue_len++] = ch;
}

bool findnextc(char* ch)
{
    for(; cur < queue_len && bednum > 0; cur++)
    {
        *ch = queue[cur];
        if(record[(int)(*ch)] == order)
        {
            return true;
        }
    }
    return false;
}

void process()
{
    int who;
    int walkaway = 0;

    int i = 0, length = strlen(arrivestr);

    for(i = 0; i < length; i++)
    {
        who = arrivestr[i];

        if(record[who] == initial)
        {
            pushqueue(who);
            record[who] = order;
            //printf("%c预定\n", who);
        }
        else if(record[who] == order)
        {
            record[who] = cancel;
            //printf("%c取消离开\n", who);
            walkaway++;
        }
        else if(record[who] == checkin)
        {
            bednum++;
            record[who] = checkout;
            //printf("%c完成服务离开\n", who);
        }
        else
        {
            //printf("%c出错\n", who);
            exit(-1);
        }
		char nextwho;
        while(findnextc(&nextwho) == true)
        {
            record[(int)(nextwho)] = checkin;
            bednum--;
            //printf("%c获取服务\n", nextwho);
        }
    }
    if(walkaway == 0)
    {
        printf("All customers tanned successfully.\n");
    }
    else
    {
        printf("%d customer(s) walked away.\n", walkaway);
    }
}

int main()
{
    //freopen("bin\\debug\\in.txt", "r", stdin);

    while(1)
    {
        init();
        scanf("%d", &bednum);
        if(bednum == 0)
        {
            break;
        }
        scanf("%s", arrivestr);
        process();
    }

    return 0;
}
